package com.yjhb.android.sbz.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import com.jojo.android.zxlib.base.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * task
 *
 * @author
 */
@DatabaseTable(tableName = "task")
public class Task extends BaseEntity {
    private Integer id;

    @DatabaseField(unique = true, canBeNull = false, id = true)
    private String dbId;

    /**
     * 发布任务的用户id
     */
    @DatabaseField(canBeNull = false)
    private int userId;

    /**
     * 审核通过
     */
    private int success;
    /**
     * 审核未过
     */
    private int fail;

    /**
     * 头像地址
     */
    private String avatar;

    /**
     * 权重
     */
    private Integer weight;
    /**
     * 快审
     */
    private int auditFast;

    /**
     * 栏目id
     */
    @DatabaseField
    private int categoryId;

    /**
     * APP名称
     */
    @DatabaseField
    private String name;

    /**
     * 标题
     */
    @DatabaseField
    private String title;


    /**
     * 设备
     */
    @DatabaseField
    private int device;//0全部  1仅安卓 2仅苹果

    /**
     * 描述
     */
    @DatabaseField
    private String remark;

    /**
     * 任务金额单个
     */
    @DatabaseField
    private BigDecimal money;

    /**
     * 最大库存量
     */
    @DatabaseField
    private int maxStock;

    /**
     * 当前剩余库存
     */
    @DatabaseField
    private int currentStock;

    /**
     * 用户提交时间限制(单位小时,即接取任务后n小时不提交视为自动放弃)
     */
    @DatabaseField
    private int taskTime;

    /**
     * 任务主审核时间(单位小时,提交后n小时不审核则系统自动通过)
     */
    @DatabaseField
    private int auditTime;

    /**
     * 1仅限一次2多次
     */
    @DatabaseField
    private int fetchType;

    /**
     * 可以接取的次数
     */
    @DatabaseField
    private int fetchNum;

    /**
     * 0待审核1审核通过2审核失败3主动停止任务4库存不足5平台下架
     */
    private Integer state;
    /**
     * 失败原因
     */
    private String rejectReason;

    /**
     * 最后刷新时间(排序用)
     */
    private Date flushTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 任务结束时间
     */
    private Date endTime;

    /**
     * 托管金额
     */
    private BigDecimal totalMoney;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 首页置顶结束时间
     */
    private Date cancelHomeTime;


    private static final long serialVersionUID = 1L;

    public Task() {
    }


    public Date getCancelHomeTime() {
        return cancelHomeTime;
    }

    public void setCancelHomeTime(Date cancelHomeTime) {
        this.cancelHomeTime = cancelHomeTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public int getAuditFast() {
        return auditFast;
    }

    public void setAuditFast(int auditFast) {
        this.auditFast = auditFast;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public String getDbId() {
        return dbId;
    }

    public void setDbId(String dbId) {
        this.dbId = dbId;
    }

    public int getFail() {
        return fail;
    }

    public void setFail(int fail) {
        this.fail = fail;
    }

    public int getSuccess() {
        return success;
    }

    public void setSuccess(int success) {
        this.success = success;
    }

    public void setFetchNum(int fetchNum) {
        this.fetchNum = fetchNum;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public int getMaxStock() {
        return maxStock;
    }

    public void setMaxStock(int maxStock) {
        this.maxStock = maxStock;
    }

    public int getCurrentStock() {
        return currentStock;
    }

    public void setCurrentStock(int currentStock) {
        this.currentStock = currentStock;
    }

    public int getTaskTime() {
        return taskTime;
    }

    public void setTaskTime(int taskTime) {
        this.taskTime = taskTime;
    }

    public int getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(int auditTime) {
        this.auditTime = auditTime;
    }

    public int getFetchType() {
        return fetchType;
    }

    public void setFetchType(int fetchType) {
        this.fetchType = fetchType;
    }

    public int getFetchNum() {
        return fetchNum;
    }

    public void setFetchNum(Integer fetchNum) {
        this.fetchNum = fetchNum;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getFlushTime() {
        return flushTime;
    }

    public void setFlushTime(Date flushTime) {
        this.flushTime = flushTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public int getDevice() {
        return device;
    }

    public void setDevice(int device) {
        this.device = device;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
}